<?php
namespace app\index\controller;
class Redis extends Base
{
    public $redis = '';
    public function initialize()
    {
        $this->redis = new \Redis();
        $this->redis->connect(config('redis.addr'), config('redis.port'));
    }
    public function set($key,$value = '')
    {
        $bool = $this->redis->set($key, $value);
        return $bool;
    }
    public function get($key)
    {
        $bool = $this->redis->get($key);
        return $bool;
    }
}
